#!/bin/python

import copy
import socket

a=[1,2,3,["a","b","c"]]

b=a


id(b)
id(a[0])

print(id(b))
print(id(a))
c=copy.copy(a)
d=copy.deepcopy(a)

a1=100
a2=100
print(id(a1))
print(id(a2))


for i in range(1,10):
    for j in range(1,i+1):
        print (" " .join(["%d*%d=%d" %(j,i,i*j)]))

#s = socket.socket(AF_INET,SOCK_STREAM)


def fx(x):
    x = "100"
    print ("x="+x)

fx(101)


x="my age is "
y=25
print(x+str(y))

x="my name's hello"
print(x)


cars = ['bmw', 'audi', 'toyota', 'subaru']

print(sorted(cars))
#print(reversed(cars))

print(cars)
cars.reverse()
print(cars)

cars.append('dazhong')
print(cars)


cars.append('dazhong')
print(cars)


cars.insert(0,'changanzhixing')
print(cars)

cars.pop(0)

print(cars)

x={'name':'zhangsan','age':'29'}

x['school']='gaozhong'
print(x.items())

for k,v in x.items():
    print("\nkey:" +k)
    print("value:" +v)
#    print(k,v)

#myname = input()
#print("myname is:" + myname)



#squares = []
#for sq in range(1,10):
#    for t in range(1,10):
#         sq1 = sq*t
#         squares.append(sq1)
#         print(squares)
for i in range(1,10):
    for j in range(1,i+1):
        d = i * j
        print('%d*%d=%-2d'%(i,j,d),end = ' ' )
    print()


l =[1, 2, [3, [4, 5, 6, [7, 8, [9, 10, [11, 12, 13, [14, 15,[16,[17,]],19]]]]]]]

def search(l: object):
    for item in l:
        if type(item) is list:
            search(item)
        else:
            print(item)

search(l)

a=1
for i in range(1,10):
    a=a*i
    print('%d!=%d'%(i,a))
    print()

b=[1,2,3,4,5]
d=['a','b','c']

c=b.copy()
b.insert(0,123)
print(b)
print(c)
print(";".join(d))
ab='my name is leichen'
print(ab.split(' '))

print("list:" + b)
a=10
if a<100:
    print(a)

   



